package com.demo.jpa.dao.entity;

import lombok.extern.log4j.Log4j2;

import javax.persistence.PostPersist;
import javax.persistence.PrePersist;

/**
 * @Author: LiaoYouLe
 * @Description:
 * @Date: Created in 8:33 2018/8/1
 * @Modified By:
 */
@Log4j2
public class PrivilegeListener {
    @PostPersist
    private void  postPersist(PrivilegeEntity privilege){
        log.info("新增之后{}",privilege);
    }

    @PrePersist
    private void  prePersist(PrivilegeEntity privilege){
        log.info("新增之前{}",privilege);
    }
}
